import React, { Component } from 'react'
import { Pagination, Row, Col } from 'antd';
import './index.css'
export default class Pagin extends Component {

    render() {
        const { total } = this.props
        return (
            <div className="pagin-style">
                <Row justify="center" align="middle" style={{ height: "50px" }}>
                    <Col>
                        <Pagination
                            total={total}
                            showTotal={total => `一共 ${total} 条`}
                            onChange={this.props.change}
                            defaultPageSize={5}
                            defaultCurrent={1}
                            pageSizeOptions={['5','10','15','20']}
                            showSizeChanger={true}
                        />
                    </Col>
                </Row>
            </div>
        )
    }
}
